Skip to content

Instantly share code, notes, and snippets.

@trongnghia203
trongnghia203 / install_pyenv.md
Last active June 3, 2024 03:41
Install pyenv
@darrnshn
darrnshn / mozGetMatchedCSSRules.js
Last active June 3, 2024 03:40 — forked from ydaniv/mozGetMatchedCSSRules.js
A Blink only polyfill for Webkit's window.getMatchedCSSRules
// polyfill window.getMatchedCSSRules() in Chrome
if ( typeof window.getMatchedCSSRules !== 'function' ) {
var ELEMENT_RE = /[\w-]+/g,
ID_RE = /#[\w-]+/g,
CLASS_RE = /\.[\w-]+/g,
ATTR_RE = /\[[^\]]+\]/g,
// :not() pseudo-class does not add to specificity, but its content does as if it was outside it
PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g,
PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g;
// convert an array-like object to array
@binhp
binhp / Netsuite-AWS-Module-Guide.md
Last active June 3, 2024 03:40
Netsuite AWS Module

AWS Module for Netsuite

AWS.S3

1. Add S3 lib

Upload ns-aws-s3.js to Netsuite Files at /SuiteScripts/lib/ns-aws-s3

File /SuiteScripts/lib/ns-aws-s3

@ManeFunction
ManeFunction / EasingFunctions.cs
Last active June 3, 2024 03:35 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
* Refactored by Mane Function
*
* The MIT License (MIT)
*
* Copyright (c) 2019-2023
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@DvilMuck
DvilMuck / aternosAntiAntiadblock.user.js
Last active June 3, 2024 03:34
Aternos Anti Anti Adblock userscript for Aternos.org
// ==UserScript==
// @name Aternos Anti Anti-adblock
// @namespace r0630hh1edcuum5397kimyc0ucwy2h3psn4c6r1u4j
// @version 0.1.23
// @description Fuck anti-adblock from the free hosting minecraft servers Aternos.org. Parry this you filthy casual!
// @author Angry Developer against excessive ADs
// @source https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a
// @supportURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a
// @updateURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a/raw/aternosAntiAntiadblock.user.js
// @downloadURL https://gist.github.com/DvilMuck/f2b14f3f65e8f22974d781277158f82a/raw/aternosAntiAntiadblock.user.js
@zapakh
zapakh / do_maze.py
Created May 22, 2024 06:01
In-situ DFS maze solver for The Farmer Was Replaced
# Make sure you have enough Fertilizer before starting.
def do_maze(iterations=1):
# Define some geometry help for later
opp = {North: South, East: West,
South: North, West: East}
dx = {North: 0, East: 1, South: 0, West: -1}
dy = {North: 1, East: 0, South: -1, West: 0}
# Start a Maze.
harvest()

现整理收集C++世界里那些“牛人”的个人博客。凡三类:一是令人高山仰止的大牛,对C++语言本身产生过深远的影响的人;二是C++运用炉火纯青的高手,有原创性的技术干货;三是中文世界里的C++牛人。

C++大牛的博客

@matteodellamico
matteodellamico / priority_dict.py
Created January 4, 2013 10:22
Priority dict: a priority queue with updatable priorities You may have needed a priority queue with the ability to change the priorities of elements that were in the queue. This recipe solves this problem in an efficient way. The priority queue is implemented as a dictionary, where keys are the items of the queue, and values are their priorities…
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@ashmalvayani
ashmalvayani / read_zst_xz_to_df.py
Last active June 3, 2024 03:24
Reading jsonl.zst, jsonl.xz in DataFrame
## Read jsonl.zst file as dataframe in python
!pip install
#####################
import io
import pandas as pd
import zstandard as zst
def read_jsonl_zst(file_path):
with open(file_path, 'rb') as file:
decompressor = zstd.ZstdDecompressor()
@jncsw
jncsw / nvidia-smi.py
Created February 27, 2022 22:26
watch nvidia-smi on windows
import subprocess
import os
import time
print(1)
while True:
# out_bytes = subprocess.check_output(['C:/Program Files/NVIDIA Corporation/NVSMI/nvidia-smi.exe'])
out_bytes = subprocess.check_output(['nvidia-smi'])
out_text = out_bytes.decode('utf-8')
os.system('cls')
print(out_text)